package com.lzx.consumer.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author 程序员星星
 * @date 2022/12/26
 * @Description
 */
@Component
@RocketMQMessageListener(consumerGroup = "mq-test", topic = "test-demo")
public class MyListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println(message);
    }
}
